#ifndef GRASSCLUSTER_H
#define GRASSCLUSTER_H

#include <GL/glew.h>
#include <SFML/OpenGL.hpp>
#include <SFML/System/Vector2.hpp>
#include <algorithm>
#include <vector>
#include "Grass.h"
#include "Structures.h"

class GrassCluster {
public:
    GrassCluster(GLfloat x, GLfloat y, GLfloat z, GLuint radius, GLuint density, Grass *grass );
    void render(vec3 camPos);

private:
    void sortByDistance();
    bool comparePositions(vec3 p1, vec3 p2);
    bool emptyCluster;
    vec3 *positions;
    vec3 eyePos;
    Grass *grass;
    GLfloat x;
    GLfloat y;
    GLfloat z;
    GLuint radius;
    GLuint density;
};

#endif // GRASSCLUSTER_H
